{% if request.user %}
    <div class="nav-user" style="float: right">
        <div class="nav-info">
            <span style="display: inline-block;margin-right: 10px;">{{ request.user.name }}</span>
            <img style="width: 44px; height: 44px;" class="img-circle" src="{{ request.user.avatar }}">
            <ul>

                <a href="{% url 'coupon' %}">
                    <li>
                        课程兑换
                        <img src="//hcdn2.luffycity.com/media/frontend/activity/back_1568185800.821227.svg">
                    </li>
                </a>


                <a href="{% url 'logout' %}">
                    <li>
                        退出
                        <img src="//hcdn2.luffycity.com/media/frontend/activity/back_1568185800.821227.svg">
                    </li>
                </a>
            </ul>
        </div>
    </div>
{% else %}
    <ul class="nav-menu" style="float: right">
        <li><a href="{% url 'wx_login' %}"><i class="fa fa-sign-in" aria-hidden="true"></i> 微信登录</a></li>
    </ul>
{% endif %}